#pragma once
#include "..\AutoPtr\AutoPtr.h"
#include "..\Regex\Regex.h"
#include "..\Common\DataBase.h"
#include "..\Common\Link.h"

enum RegexTokenType
{
	ttString,
	ttOperator,
	ttSymbol,
	ttSpace,
	ttEnter,
	ttNumber,
	ttNull
};

class NToken
{
public:
	NWString m_Content;
	RegexTokenType m_Type;
	int m_Line;

	NToken();
	NToken(NWString Content,RegexTokenType Type,int Line);
	~NToken();
};

class NTokenRegex
{
public:
	NAutoPtr<Regex> TheRegex;
	RegexTokenType Type;
	BOOL Exit;

	NTokenRegex(NWString Expression,RegexTokenType Type,BOOL Exit);
};

class NLexer
{
protected:
	List<NAutoPtr<NTokenRegex>> RegexList;
	int RegexListCount;
public:
	NLexer();
	List<NAutoPtr<NToken>> m_Tokens;

	void Lexer(NWString wCode);
	void Print();
};